package com.yitianyigexiangfa.java.concurrency.playground.concurrent.util;

import org.junit.Test;

import java.util.concurrent.CompletableFuture;

/**
 * @author Bill Lau
 * @date 2017-12-11
 */
public class MyCompletableFutureBall {

    @Test
    public void testThenApply(){
        String result = CompletableFuture.supplyAsync(() -> "Hello").thenApply((s) -> s + " World" ).join();
        System.out.println(result);
    }
}
